package com.sr.demo.security.nuoauth.dto;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;

import javax.validation.constraints.NotNull;
import java.util.Collection;
import java.util.Date;


/**
 * 权限表(NuoAuth)表数据库访问层
 *
 * @author liushuai
 * @since 2021-02-13 22:09:53
 */
@ApiModel(value = "权限表")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
public class NuoAuthDTO implements GrantedAuthority {
    private static final long serialVersionUID = 641033161869692339L;


    /**
     * 权限id主键
     */
    @NotNull(message = "{id.require}")
    @ApiModelProperty(value = "权限id主键")
    private String authId;
    /**
     * 权限名称
     */
    @NotNull(message = "权限名称不能为空")
    @ApiModelProperty(value = "权限名称")
    private String authName;
    /**
     * 权限编号
     */
    @NotNull(message = "权限编号不能为空")
    @ApiModelProperty(value = "权限编号")
    private String authCode;
    /**
     * 是否菜单权限
     */
    @NotNull(message = "是否菜单权限不能为空")
    @ApiModelProperty(value = "是否菜单权限")
    private Integer isMenu;
    /**
     * 权限url
     */
    @ApiModelProperty(value = "权限url")
    private String authUrl;
    /**
     * 菜单id
     */
    @ApiModelProperty(value = "菜单id")
    private String menuUrl;
    /**
     * 权限父id
     */
    @NotNull(message = "权限父id不能为空")
    @ApiModelProperty(value = "权限父id")
    private String pid;
    /**
     * 创建人
     */
    @NotNull(message = "创建人不能为空")
    @ApiModelProperty(value = "创建人")
    private String createUser;
    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private String updateUser;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateDate;


    @Override
    public String getAuthority() {
        return null;
    }
}